using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Runtime.Serialization;

namespace KPIS.GERP.Models.BGM
{
	[Table("bgm_project"), DataContract]
    public class Project
    { 
        public Project()
        {
        }

        [Key]
        [DataMember]
		[Column("bgm_proj_seq", TypeName="int")]
        public int ProjId { get; set; }

        [DataMember]
        [Column("bgm_proj_code", TypeName="ntext")]
        public string Code { get; set; }

        [DataMember]
        [Column("bgm_proj_name", TypeName="ntext")]
        public string Name { get; set; }

        [DataMember]
        [Column("bgm_proj_descr", TypeName="ntext")]
        public string Description { get; set; }

        [DataMember]
        [Column("bgm_proj_manager", TypeName="int")]
        public Nullable<int> ProjMngId { get; set; }

        [DataMember]
        [Column("bgm_proj_scope", TypeName="int")]
        public Nullable<int> ProjectScope { get; set; }

        [DataMember]
        [Column("bgm_proj_date", TypeName="datetime2")]
        public Nullable<System.DateTime> ProjectDate { get; set; }

        [DataMember]
        [Column("bgm_proj_reason", TypeName="ntext")]
        public string ProjectReasons { get; set; }

        [DataMember]
        [Column("bgm_proj_object", TypeName="ntext")]
        public string ProjectObject { get; set; }

        [DataMember]
        [Column("bgm_proj_target", TypeName="ntext")]
        public string ProjectTarget { get; set; }

        [DataMember]
        [Column("bgm_proj_plan", TypeName="ntext")]
        public string ProjectPlan { get; set; }

        [DataMember]
        [Column("bgm_proj_remark", TypeName="ntext")]
        public string ProjectRemarks { get; set; }

        [DataMember]
        [Column("bgm_strat_list_seq", TypeName="int")]
        public Nullable<int> StratListId { get; set; }

        [DataMember]
        [Column("prj_type_seq", TypeName="int")]
        public Nullable<int> ProjectTypeId { get; set; }

        [DataMember]
        [Column("job_site_seq", TypeName="int")]
        public Nullable<int> JobSiteId { get; set; }

        [DataMember]
		[Column("job_site_seq_main", TypeName="int")]
        public Nullable<int> JobSiteIdMain { get; set; }

        [DataMember]
		[Column("bgm_year", TypeName="int")]
        public Nullable<int> BgYear { get; set; }

        [DataMember]
		[Column("date_start", TypeName="datetime2")]
        public Nullable<System.DateTime> DateStart { get; set; }

        [DataMember]
		[Column("date_end", TypeName="datetime2")]
        public Nullable<System.DateTime> DateEnd { get; set; }

        [DataMember]
		[Column("gfmis_code", TypeName="ntext")]
        public string GfmisCode { get; set; }

        [DataMember]
		[Column("alt_proj_seq", TypeName="int")]
        public Nullable<int> AltProjId { get; set; }

        //public virtual ICollection<ProjectActivityPlan> ProjectActivityPlans { get; set; }

        //[DataMember]
        //public virtual ICollection<ProjectCustomField> ProjectCustomFields { get; set; }

        //[DataMember]
        //public virtual ICollection<ProjectExpense> ProjectExpenses { get; set; }

        //[DataMember]
        //public virtual ICollection<ProjectKpi> ProjectKPIs { get; set; }

        //[DataMember]
        //public virtual ICollection<ProjectManager> ProjectManagers { get; set; }

        //[DataMember]
        //public virtual ICollection<ProjectOption> ProjectOptions { get; set; }

        //[DataMember]
        //public virtual ICollection<ICM.RequestParcel> RequestParcels { get; set; }
        


        #region RecordStatus

        [DataMember, Display(Name = "RecordStatus", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("record_status", TypeName="ntext")]
        public string RecordStatus { get; set; }

        [DataMember, Display(Name = "CreatedBy", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("created_by", TypeName="int")]
        public Nullable<int> CreatedBy { get; set; }

        [DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("created_when", TypeName="datetime2")]
        public Nullable<System.DateTime> CreatedWhen { get; set; }

        [DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("updated_by", TypeName="int")]
        public Nullable<int> UpdatedBy { get; set; }

        [DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("updated_when", TypeName="datetime2")]
        public Nullable<System.DateTime> UpdatedWhen { get; set; }

        #endregion
    }
}